package com.hmkj.core.service.account;

import com.hmkj.core.api.lianlian.PayDataBean;
import com.hmkj.core.api.lianlian.PaymentInfo;
import com.hmkj.core.api.lianlian.PaymentInfo2;
import com.hmkj.core.po.account.AccountRecharge;
import com.hmkj.core.service.base.GenericService;

import javax.servlet.http.HttpServletRequest;

/**
 * 充值记录业务相关Service接口<br>
 *
 * @author eproo
 * @ClassName: AccountRechargeService
 * @date 2018-07-05 09:50:54
 */
public interface AccountRechargeService extends GenericService<Integer, AccountRecharge> {

    /**
     * 联联支付 充值
     *
     * @param userId 用户ID
     * @param bankId 银行卡ID
     * @param hmTk   订单标识
     * @param amount 充值金额
     */
    PaymentInfo2 doRechargeByLianLian(HttpServletRequest req, Integer userId, Integer bankId, String hmTk, String amount);

    /**
     * 连连支付异步回调处理业务
     *
     * @param payDataBean 订单返回信息
     */
    void handleRechargeByLianLian(PayDataBean payDataBean);

    /**
     * 通过用户id和订单编号查询充值订单
     *
     * @param orderId 订单号
     * @return 充值订单
     */
    AccountRecharge findByUserIdAndOrderNo(String orderId);

    /**
     * 人工充值
     * @param accountRecharge
     * @throws Exception
     */
    void addRechargeMoney(AccountRecharge accountRecharge) throws Exception;
}
